package string;

/**
 * boolean startWith(String str)
 * boolean endWith(String str)
 *
 * 判断开头结尾字符串是否正确
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String line = "http://www.tedu.cn";

        boolean starts = line.startsWith("http");
        System.out.println(starts);

        boolean ends = line.endsWith("cn");
        System.out.println(ends);

    }
}
